package ru.compscicenter.uno.model;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Павел
 * Date: 27.10.11
 * Time: 23:36
 * Interface for Model and Controllers
 */
public interface IModel {
	public int getCurrentPlayerId();
	public int getRoundWinnerPlayerId();
	public int getGameWinnerPlayerId();
	public void setCurrentPlayerId(int currentPlayerId);
	public int getMyPlayerId();
	public void setMyPlayerId(int myPlayerId);
	public List<Player> getPlayers();
	public int getPointsToWin();
	public void setPointsToWin(int pointsToWin);
	public List<Card> getTakingDeck();
	public void setTakingDeck(LinkedList<Card> takingDeck);
	public List<Card> getDroppedDeck();
	public void setDroppedDeck(LinkedList<Card> droppedDeck);
	public Rules getRules();
	public void setRules(Rules rules) ;

	public boolean isClockwise();
	public Card getTopCard();
	public Card.Color getTopColor();
	public int getTakingDeckSize();
	public int getDroppedDeckSize();
	public int getPlayersCount();

	public boolean startGame() throws ModelException;
	public boolean startRound() throws ModelException;

	public boolean isRoundEnded();
	public boolean isGameEnded();
	public boolean isGameRunning();

	public boolean doDropCard(int playerId, int cardId) throws ModelException;
	public boolean doDropCard(int playerId, int cardId, Card.Color selectedColor) throws ModelException;
	public boolean doTakeCard(int playerId) throws ModelException;
	public boolean doSayUno(int playerId) throws ModelException;
	public boolean doSomebodyDidntSayUno(int playerId, int whoDidntSayUnoId) throws ModelException;
	public boolean doEndTurn(int playerId);
    public boolean isIDidSomething();

	public boolean addPlayer(Player player);
	public boolean removePlayer(int playerId);

	public Player getPlayer(int id);
	public int nextPlayerId();
	public int nextPlayerId(int playerId);
}
